def brain_check(user):
    if user is None:
        return None

    if user.downright > 0:
        return False

    if user.credit_type == "心" and user.credit_level < 4:
        return False

    if user.week_avg >= 2.2:
        return False

    if len(user.day_avg) > 0:
        for day in user.day_avg:
            if day > 4:
                return False
        one = [day for day in user.day_avg if day <= 1]
        if len(one) == 0:
            return False

    if user.svip:
        if user.near_week_check > 7:
            return False
        if user.last_week_check > 7:
            return False
    else:
        if user.near_week_check > 6:
            return False
        if user.last_week_check > 6:
            return False

    return True


def mirror_check(user):
    if user is None:
        return None

    if user.downright > 0:
        return False

    if user.near_week_check > 7:
        return False

    if user.last_week_check > 7:
        return False

    if user.week_avg >= 1.8:
        return False

    return True
